package jxcmanager.jxc.service.impl;

import jxcmanager.jxc.service.IRbacservice;
import jxcmanager.jxc.service.IRoleMenuService;
import jxcmanager.jxc.service.IUserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class IRbacServiceImpl implements IRbacservice {

    @Resource
    private IUserRoleService userRoleService;

    @Resource
    private IRoleMenuService roleMenuService;

    @Override
    public List<String> findRoleByUserName(String username) {
        return userRoleService.findRoleByUserName(username);
    }

    @Override
    public List<String> findAuthoritiesByRoleName(List<String> roleNames) {
        return roleMenuService.findAuthoritiesByRoleName(roleNames);
    }
}
